<?if($this->query->count() > 0):?>
	<table summary="boards" class="table_boards"> 
	<tr  class="board_category">
		<th><?=$this->translate->_('board_title')?></th>
		<th width="10%" class="center"><?=$this->translate->_('board_topics')?></th>
		<th width="10%" class="center"><?=$this->translate->_('board_posts')?></th>
		<th width="20%" class="center"><?=$this->translate->_('board_last_topics')?></th>
	</tr>
	
	<?foreach($this->query->toArray() AS $result):?>
		<?if($result['is_public'] == 0 && !$this->hasAccess($result['uid'])): continue; endif;?>
	<tr class="board_boards">
		<td class="board_title middle">
			<a href="<?=$this->url(array('controller' => 'threads', 'uid' => $result['uid'], 'title' => $this->escape($this->CleanUrlTitle($result['title']))), 'boards', true);?>">
				<?=$result['title']?>
			</a>
			<br />
			<span class="board_desc"><?=$this->escape($result['desc'])?></span>
			<?=$this->partial('index/subboards.phtml', array('query' => $this->getSubBoards($result['uid']), 'translate' => $this->translate))?>
		
		</td>
		<td class="board_threads middle center"><?=$result['count_threads']?></td>
		<td class="board_posts middle center"><?=$result['count_posts']?></td>
		<td class="middle center board_last_post"><?=$this->getLastThread($result['last_post_uid'])?></td>
	</tr>
	<?endforeach;?>
	</table>
	<br />
<?endif;?>